<?php
/* SVN FILE: $Id: login.ctp 12 2009-09-26 20:39:20Z kenreily@gmail.com $ */
/**
 * Short description for file.
 *
 * Long description for file
 *
 * PHP versions 4 and 5
 *
 * Recenseo: Online submission and reviewing for education
 * Copyright 2008-2009, Ken Reily
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * $Date: 2009-09-26 20:39:20 +0000 (Sat, 26 Sep 2009) $
 * $Revision: 12 $
 * $Author: kenreily@gmail.com $
 * $HeadURL: http://recenseo.googlecode.com/svn/trunk/app/views/users/login.ctp $
 */

  // If external authentication is successful, but Cake authentication is not,
  // then just deny access without the opportunity to log in.
  if (!empty($_SERVER['REMOTE_USER']))
  {
    echo $html->div('message',"{$_SERVER['REMOTE_USER']} is not authorized to access this application.");
  }
  else
  {
    $session->flash('auth');
    echo $form->create('User', array('action' => 'login'));
    echo $form->input('username');
    echo $form->input('password');
    echo $form->end('Login');
  }
?>